package com.ck.model.chuangke.vo;

import com.ck.constant.LogType;
import com.ck.util.DateUtils;

/**
 * 
 * <p>Title: CkDeviceInfoVO</p>  
 * <p>Description: 创客设备日志VO</p>  
 * @author huangf 
 * @date 2018年7月9日
 */
public class CkDeviceLogListVO {
	/** 上传时间 */
	private Long createTime;
	/** 日志名称 */
	private String logName;
	/** 日志类型 */
	private String logType;
	/** 日志存储路径（阿里云或华为云地址） */
	private String logURL;

	public Long getCreateTime() {
		return createTime;
	}
	
	public String getCreateTimeDesc() {
		if ( null == createTime ) {
			return null;
		}
		return DateUtils.longTimeStampToStringDate(createTime, DateUtils.PATTEN_YMD_HMS); 
	}
	
	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public String getLogName() {
		return logName;
	}

	public void setLogName(String logName) {
		this.logName = logName;
	}

	public String getLogType() {
		return logType;
	}
	
	public String getLogTypeDesc() {
		if ( null == logType ) {
			return null;
		}
		try {
			return LogType.valueOf(logType).getLogName(); 
		} catch (Exception e) {
			return "其他"; 
		}
	}
	
	public void setLogType(String logType) {
		this.logType = logType;
	}

	public String getLogURL() {
		return logURL;
	}

	public void setLogURL(String logURL) {
		this.logURL = logURL;
	}

	@Override
	public String toString() {
		return "CkDeviceLogListVO{" +
				"createTime=" + createTime +
				", logName='" + logName + '\'' +
				", logType='" + logType + '\'' +
				", logURL='" + logURL + '\'' +
				'}';
	}
}
